home *** CD-ROM | disk | FTP | other *** search
/ Freaks Macintosh Archive / Freaks Macintosh Archive.bin / Freaks Macintosh Archives / Textfiles / cracking / BeginnersMacAssembly.sit.hqx / BeginnersMacAssembly.rsrc / PICT_65.png < prev    next >
Portable Network Graphic  |  1997-07-26  |  153KB  |  816x1056  |  8-bit (256 colors)
Labels: book | bulletin board | poster | reckoner | sky | tree | windowpane
OCR: LaN6b 17. 1996 Beginners Guide Macintosh Assembly Language Programming 5age MULS D3 D1 V COORDINATE TIMES THE LENGTH OF EACHLINE ADD LD0,D1 VRAM ADDRESS OF THIS PIXEI ADD LD1 ,A1 ABSOLUTE ADDRESS OF THIS PIXEL MOVE. D2,A1 SET THE PIXEL TO THE COLOUR IN D2 MOVEM.L SP+ DO- D3/ RESTORE THE REGS TO HOW THEY WERE RTS END OF SUBROUTINE PLOT In this example, we use subroutine called "plot to plot a pixel on the screen, with the colour in d2. It follows the principles detailed above to calculate the VRAM address of the pixel and then moves D2 as byte into this address This example sets the pixel at 500. 200 to the colour 20 which on my machine, in the default set up 1S pinky col our If you run it in Fantasm. by telling Fantasm to assemble to Mac ram, you should see a single pink spot in the middle ...